package com.iqiyi.pps.epg.api.server.impl;

import com.iqiyi.pps.epg.api.server.iservice.VodApiService;
import com.iqiyi.pps.epg.api.server.proxy.VodProxy;
import com.iqiyi.pps.epg.api.utils.CrossDataLocalPool;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.ws.rs.FormParam;

/**
 * Created by karkarrotxu on 2017/7/31.
 */
@Service("vodApiServiceImpl")
public class VodApiServiceImpl extends ApiServiceImpl implements VodApiService {

    @Autowired
    private VodProxy vodProxy;

    @Override
    public String getVodLogList(String channelId, Integer pageNo, Integer pageSize) {
        CrossDataLocalPool.set(getCrossData());
        return vodProxy.getVodLogList(channelId, pageNo, pageSize);
    }

    @Override
    public String getVodLogListByFilter(String paramsObj, Integer pageNo, Integer pageSize) {
        CrossDataLocalPool.set(getCrossData());
        return vodProxy.getVodLogListByFilter(paramsObj, pageNo, pageSize);
    }

    @Override
    public String getVodEpisodeLogList(String paramsObj, Integer pageNo, Integer pageSize) {
        CrossDataLocalPool.set(getCrossData());
        return vodProxy.getVodEpisodeLogList(paramsObj, pageNo, pageSize);
    }


    @Override
    public String saveVodLog(String dataString) {
        CrossDataLocalPool.set(getCrossData());
        return vodProxy.saveVodLog(dataString);
    }

    @Override
    public String saveEpisodeLog(String dataString) {
        CrossDataLocalPool.set(getCrossData());
        return vodProxy.saveEpisodeLog(dataString);
    }

    @Override
    public String addVodRecord(String dataString) {
        CrossDataLocalPool.set(getCrossData());
        return vodProxy.addVodRecord(dataString);
    }

    @Override
    public String getVodRecordList(String channelId, Integer pageNo, Integer pageSize) {
        CrossDataLocalPool.set(getCrossData());
        return vodProxy.getVodRecordList(channelId, pageNo, pageSize);
    }

    @Override
    public String editVodRecord(String dataString) {
        CrossDataLocalPool.set(getCrossData());
        return vodProxy.editVodRecord(dataString);
    }

    @Override
    public String delVodRecord(String channelId, String taskId) {
        CrossDataLocalPool.set(getCrossData());
        return vodProxy.delVodRecord(channelId, taskId);
    }

    @Override
    public String addVodad(String dataString) {
        CrossDataLocalPool.set(getCrossData());
        return vodProxy.addVodad(dataString);
    }

    @Override
    public String getVodadList(String paramsObj, Integer pageNo, Integer pageSize) {
        CrossDataLocalPool.set(getCrossData());
        return vodProxy.getVodadList(paramsObj, pageNo, pageSize);
    }

    @Override
    public String delVodad(String id) {
        CrossDataLocalPool.set(getCrossData());
        return vodProxy.delVodad(id);
    }
}
